name: docker image ci
on:
  push:
    branches: [ "master" ]

jobs:
  build-docker-image:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      - uses: docker/setup-buildx-action@v2
      - uses: mr-smithers-excellent/docker-build-push@v5
        with:
          image: ${{ secrets.DOCKERHUB_USERNAME }}/accounting-for-media
          tags: latest
          dockerfile: Dockerfile
          registry: docker.io
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_PASSWORD }}